package com.hmall.common.client;

import com.hmall.common.dto.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @Author www
 * @Description Feign远程调用userservice
 * @Date 2023/4/8 17:16
 * @Version 1.0
 */
@FeignClient(value = "userservice")
public interface UserClient {

    /**
     * 根据id获取用户地址
     * @param id
     * @return
     */
    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);
}
